<?php
if($this->user==Zend_Auth::getInstance()->getIdentity()->login){
    echo $this->form;
}
?>

<?php foreach ($this->photo_albums as $album):?>

<?php ?>

<div class="album" style="float:left; margin: 10px; text-align:center; width: 150px; height: 100px">
<a
	href="<?php
echo $this->url(
array('controller' => 'photo', 'action' => 'album','request' => array($this->user,$album->id)),"default")?>">


<?php 
//for main picture

$photo_model = new Model_Photo($this->user);
$img = $photo_model->getPhotosList($album->id);

?>
<img src="<?php echo $this->dir.DIRECTORY_SEPARATOR.$this->user.DIRECTORY_SEPARATOR.$album->id.DIRECTORY_SEPARATOR.'thumb'.DIRECTORY_SEPARATOR.$img[0];?>">
<div style="width: 150">
<?php
echo $album->name;?>
</div>

</a>
        </div>
<?php endforeach;?>

